<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * User profile model
 *
 * @author Ali OYGUR <alioygur@gmail.com>
 * */
class User_profile_model extends CI_Model
{
	public function __construct()
	{
		parent::__construct();
	}

	public function add($data = array())
	{
		return $this->db->insert('user_profile', $data);
	}

	public function get($user_id, $select = '*')
	{
		$q = $this->db->select($select)->get_where('user_profile', array('user_id' => $user_id));

		if (!$q->num_rows())
			return false;

		return $q->row();
	}

	public function edit($data = array(), $options = array())
	{
		return $this->db->update('user_profile', $data, $options);
	}

	public function delete($options = array())
	{
		return $this->db->delete('user_profile', $options);
	}
}

/* End of file User_profile_model.php */
